﻿@page "/author"
@inject ILoggerFactory _loggerFactory;
@using Y.Blog.Host.Data;

<PageTitle>关于作者</PageTitle>

<div>
   <div class="box"> 
        <GridRow>
            <GridCol Span="4">
                <Avatar Src="/images/初代.jpg" Alt="作者头像" Size="120"></Avatar>
            </GridCol>
            <GridCol Span="4">
                <Tooltip Title="这里不知道写点什么，先空着">

                </Tooltip>
            </GridCol>
            <GridCol Span="16">
                <div class="container" >
                        一名.net 开发者，初级程序员，稍微熟悉ABP,ABP VNext，会写一点vue(不太擅长)
                        ，喜欢探索新事物，厌恶一成不变的生活，<Tooltip Title="高中看了很多书，大概几千万字">喜欢看书</Tooltip>。
                        高一看了《三重门》深陷批判应试教育的思维中无法自拔，自此学习无果，成绩不堪入目。
                        高二迷上篮球，同时仍在看书,看了两三本<Tooltip Title="一般只能如此评判">《十宗罪》</Tooltip>
                        从而厌恶类似的书，看过<Tooltip Title="恶心且毫无意义">鸡汤文</Tooltip>两三本从此厌恶且不再看。
                        而后迷上村上春树最喜欢《挪威的森林》
                        、喜欢<Tooltip Title="《挪威的森林》的人物">绿子</Tooltip>，
                        喜欢张爱玲的<Tooltip Title="一本自传性质的小说">《小团圆》</Tooltip>
                        余华 《许三观卖血记》《活着》
                        太宰治《罗生门》
                        王小波《爱你就像爱生命》《黄金时代》《白银时代》
                        韩寒 《三重门》《1988：我想和这个世界谈谈》
                        林奕含 《房思琪的初恋乐园》
                        东野圭吾 《解忧杂货铺》 
                        某外国作家（不记得名字了）《一个人的朝圣》
                        <p>梦想：写一本小说，旅游，过着不受束缚的生活，偶尔写写代码</p>
                </div>
            </GridCol>
        </GridRow>
   </div>
   <div class="box">
    <Descriptions Title="个人信息">
    <DescriptionsItem Title="芳名">FourEleven</DescriptionsItem>
    <DescriptionsItem Title="打 Call">17363955980</DescriptionsItem>
    <DescriptionsItem Title="目前活着的地方">广州, 广东</DescriptionsItem>
    <DescriptionsItem Title="邮箱">wyg154511sj1@63.com</DescriptionsItem>
    <DescriptionsItem Title="标签">
<div class="tag-colorful-demo">
    <Tag Color="#f50">篮球</Tag>
    <Tag Color="#2db7f5">.NET 菜鸡程序员</Tag>
    <Tag Color="#87d068">会一点前端</Tag>
    <Tag Color="#108ee9">喜欢听HipHop</Tag>
    <Tag Color="HotPink">喜欢看小说</Tag>
    <Tag Color="HotPink">喜欢韩寒、张爱玲、村上春树、王小波</Tag>
</div>
    </DescriptionsItem>
            <DescriptionsItem Title="Github"><a href="https://github.com/Calo-YG/NewBlog">https://github.com/Calo-YG/NewBlog</a></DescriptionsItem>
            <DescriptionsItem Title="博客园"><a href="https://www.cnblogs.com/lonely-wen">https://www.cnblogs.com/lonely-wen</a></DescriptionsItem>
    <DescriptionsItem Title="活着的详细地方">
        往左往右、往左往右、如此而已
    </DescriptionsItem>
</Descriptions>
</div> 
<div style="height:auto">
    <GridRow>
            <GridCol Span="@Span">
            <Tooltip Title="今年要看的书" Style="width:100%" Placement="@Placement.Top">
                @if(PrepareBooks.Any())
                {
                        <AntList DataSource="@PrepareBooks" TItem="LikeBook">
                            <ListItem>
                                <ListItemMeta Description="@context.Description">
                                    <TitleTemplate>
                                        <span>@context.Author :</span> <span>《@context.Name》</span>
                                    </TitleTemplate>
                                </ListItemMeta>
                            </ListItem>
                        </AntList>
                    }

            </Tooltip>
        </GridCol>
            <GridCol Span="@Span"  Style="width:100%" Class="tipbox">
                <Tooltip Title="喜欢的书" Style="width:100%" Placement="@Placement.Top">
                @if (Books.Any())
                {
                    <AntList DataSource="@Books" TItem="LikeBook">
                        <ListItem>
                        <ListItemMeta Description="@context.Description">
                             <TitleTemplate>
                                    <span>@context.Author :</span> <span>《@context.Name》</span>
                            </TitleTemplate>
                        </ListItemMeta>
                    </ListItem>
                </AntList>
                }              
                </Tooltip>
        </GridCol>
            <GridCol Span="@Span">
                <Tooltip Title="准备要做的事，第三个可能会去做" Class="tipbox" Placement="@Placement.Top">
                    <Steps Size="small" Current=Current Percent="Percent" Direction="vertical">
                        <Step Title="完成接口列表开发" />
                        <Step Title="登录注册-博客功能开发" />
                        <Step Title="推荐功能开发" />
                    </Steps>
                </Tooltip>
        </GridCol>
    </GridRow>

</div>
</div>


@code {
    /// <summary>
    /// 当前状态
    /// </summary>
    private int Current = 0;
    /// <summary>
    /// 进度条
    /// </summary>
    private int Percent = 10;
    /// <summary>
    /// 书籍
    /// </summary>
    private List<LikeBook> Books;
    private int Span = 8;

    private List<LikeBook> PrepareBooks;


    protected override void OnInitialized()
    {
        InitBooks();
        InitPrepare();
    }

    private void Stepchange()
    {
        var logger = _loggerFactory.CreateLogger<Step>();
        logger.LogInformation("步骤触发切换");
    }

    private void InitBooks()
    {
        Books = new List<LikeBook>();
        Books.Add(new LikeBook
        {
            Author="王小波",
            Name = "黄金时代"
        });
        Books.Add(new LikeBook
        {
            Author = "村上春树",
            Name = "挪威的森林"
        });
        Books.Add(new LikeBook
        {
            Author = "张爱玲",
            Name = "小团圆"
        });
        Books.Add(new LikeBook
        {
            Author = "韩寒",
            Name = "1988：我想和这个世界谈谈"
        });
    }

    private void InitPrepare()
    {
        PrepareBooks = new List<LikeBook>();
        PrepareBooks.Add(new LikeBook
        {
           Author = "王小波",
           Name="黄金时代"
        });
        PrepareBooks.Add(new LikeBook
        {
           Author = "王小波",
           Name = "沉默的大多数"
        });
        PrepareBooks.Add(new LikeBook
        {
           Author = "王小波",
           Name = "爱你就像爱生命"
        });
        PrepareBooks.Add(new LikeBook
        {
           Author = "村上春树",
           Name = "1Q84"
        });
        PrepareBooks.Add(new LikeBook
        {
           Author = "杜拉斯",
           Name = "情人"
        });
    }
}
